package com.olive.remote;


import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import com.olive.config.FeignConfiguration;
import com.olive.dto.Order;
import com.olive.fallback.ServiceRemoteApiFallback;

@FeignClient(value="order-web-service",
        fallbackFactory = ServiceRemoteApiFallback.class,
        configuration = FeignConfiguration.class)
public interface OrderServiceRemoteApi {

    @RequestMapping("/order/findById/{id}")
    Order findById(@PathVariable("id") Integer id);
}